#pragma once

#include ".\AnimStructure.h"

class CImporter;

class CAnimation
{
public:
	float				m_fElapsedTime;
	float				m_fFrame;
	int					m_nFirstFrame;
	int					m_nLastFrame;
	int					m_nCurAnimFirst;
	int					m_nCurAnimLast;
	int					m_nCurFrame;
	int					m_nBip;
	int					m_nFrameRate;
	DWORD				m_dwAnimPlay;
	SceneMng			m_Scene;
	BipMesh*			m_pBipMesh;
	D3DXMATRIX**		m_ppAniMatrix;
	D3DXQUATERNION**	m_ppAniQuater;
	D3DXMATRIX*			m_pBipMatrix;
	bool				m_pAnimEnd;
	bool				m_bIsLoadData;
	float				m_fAnimSpeed;
	TCHAR				m_szCurAnimName[50];

public:
	VOID	Init();
	BOOL	Frame( float fElapsedTime );
	BOOL	AnimFrame( int nCurFrame , float fElapsedTime );
	//BOOL	EditAnimFrame( int	nCurFrame , float fElapsedTime );
	VOID	Render();
	VOID	Release();

	//BOOL	GoPrevFrame();
	//BOOL	GoNextFrame();
	BOOL	GoFirstFrame();
	//void	Setframe( int nFrame );
	void	AnimRelease();
	void	MeshRelease();
	inline	DWORD	GetAnimPlay() { return m_dwAnimPlay; };

public:
	CAnimation(void)			{ Init(); };
	virtual ~CAnimation(void)	{};
};
